import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import {
  Button,
  Container,
  Aside,
  Main,
  Header,
  Menu,
  MenuItem,
  Submenu,
  MenuItemGroup,
  Tag,
  Avatar,
  Dropdown,
  DropdownMenu,
  DropdownItem,
  Card,
  Row,
  Col,
  Divider,
  Table,
  TableColumn,
  Breadcrumb,
  BreadcrumbItem,
  Form,
  FormItem,
  Input,
  Tooltip
}
  from 'element-ui'
import Fragment from 'vue-fragment'
import "@/mock/Mock"
import "./permission"

import "@/assets/scss/index.scss"
Vue.use(Fragment.Plugin)
Vue.use(Button)
Vue.use(Container)
Vue.use(Aside)
Vue.use(Main)
Vue.use(Header)
Vue.use(Menu)
Vue.use(MenuItem)
Vue.use(Submenu)
Vue.use(MenuItemGroup)
Vue.use(Tag)
Vue.use(Avatar)
Vue.use(Dropdown)
Vue.use(DropdownMenu)
Vue.use(DropdownItem)
Vue.use(Row)
Vue.use(Col)
Vue.use(Card)
Vue.use(Divider)
Vue.use(Table)
Vue.use(TableColumn)
Vue.use(Breadcrumb)
Vue.use(BreadcrumbItem)
Vue.use(Form)
Vue.use(FormItem)
Vue.use(Input)
Vue.use(Tooltip)

Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App),
  created() {
    if (store.state.Dynamic.dymicRouter.length >= 0) {
      store.state.Dynamic.dymicRouter.forEach(route => {
        router.addRoute(route)
      })
    }
    store.commit("brand/set_brandRoute", "")

  }
}).$mount('#app')
